package com.coachtam.ljgcapi.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.http.HttpStatus;

/**
 * @Copyright (C), 2018-2020
 * @Author: JAVA在召唤
 * @Date: 2020-08-05 13:10
 * @Description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResultVO {
    private Integer code;
    private String msg;
    /**
     * 已加入黑名单
     */
    private  static final String IN_BLACK_LIST = "You're already on the blacklist!";
    /**
     * 黑名单警告
     */
    private  static final String WARN_BLACK_LIST = "If you visit more frequently, you will be blacked out!";


    public static ResultVO inBackList(){
        return new ResultVO(HttpStatus.TOO_MANY_REQUESTS.value(),ResultVO.IN_BLACK_LIST);
    }

    public static ResultVO warnBackList(){
        return new ResultVO(HttpStatus.TOO_MANY_REQUESTS.value(),ResultVO.WARN_BLACK_LIST);
    }
}
